<template>
    <div>
        子组件<br />
         <button @click="handleClick">点击</button>
    </div>
</template>
<script setup>
import {ref} from 'vue'
const msg = "子组件的值"
const emit = defineEmits(['event'])
const handleClick = ()=>{
    emit('event',msg)
}
</script>

